<title>天河文化馆小程序 API 文档</title>

<style>
    div{display: none}
    blockquote{background: #dbeadb; margin: 0px; padding: 8px 5px 8px 10px; border-left: 5px solid green}
    h2{color: green; font-size: 16px; margin: 20px 0 10px 0; display: block; cursor: pointer}
    h4{margin: 15px 0 5px 0}
    body{font-size: 14px}
    table{border:0;margin:0;border-collapse:collapse;border-spacing:0;}
    td, th{font-size: 14px; border: 1px solid #999999; padding: 5px 10px; color: #666666}
    th{background: #eaeaea;}
    pre{border: 1px solid #e8e8e8; background: #EEEEEE; padding: 10px; font-size: 12px; margin: 0}
</style>
<?php
require_once __DIR__ . '/Parser.php';
$parser = new Parser();
$text = file_get_contents( __DIR__ . '/api-doc.md');
$html = $parser->makeHtml($text);
$html = str_replace(['<h2>', '</h2>'], ['</div><h2>', '</h2><div>'], $html);
echo $html;

?>
<script src="./Public/admin/js/jquery-1.8.3.min.js" ></script>
<script>
    $(function () {
        $("h2").toggle(function () {
            $(this).next("div").show();
        }, function () {
            $(this).next("div").hide();
        })
    })
</script>
